import Vue from 'vue';
import VueRouter from 'vue-router';

Vue.use(VueRouter);

const routes = [
  {
    // 系统首页
    path: '/',
    name: 'index',
    component: (resolve) => require(['@/views/IndexView'], resolve),

  },
  
  {
    // 商品搜索结果展示页面
    path: '/list',
    name: 'list',
    component: (resolve) => require(['@/views/ListView'], resolve),
  },
  {
    path: '/login',
    name: 'login',
    component: (resolve) => require(['@/views/LoginView'], resolve),
  },
  {
    path: '/register',
    name: 'register',
    component: (resolve) => require(['@/views/RegisterView'], resolve),
  },
  {
    // 商品详情页面
    path: '/detail',
    name: 'detail',
    component: (resolve) => require(['@/views/DetailView'], resolve)
  },
  {
    //移民项目
    path: '/Project',
    name: 'Project',
    component: (resolve) => require(['@/views/Project'], resolve)
  },
  {
    // 项目详情页
    path: '/ProjectDetail',
    name: 'ProjectDetail',
    component: (resolve) => require(['@/views/ProjectDetail'], resolve)
  },
  {
    // 购房移民列表
    path: '/House',
    name: 'House',
    component: (resolve) => require(['@/views/House'], resolve)
  },
  {
    // 房产详情页
    path: '/HouseDetail',
    name: 'HouseDetail',
    component: (resolve) => require(['@/views/HouseDetail'], resolve)
  },
  
  {
    // 移民评估页面
    path: '/evaluate',
    name: 'evaluate',
    component: (resolve) => require(['@/views/evaluate'], resolve)
  },
  {
    // 免费领取资料
    path: '/information',
    name: 'information',
    component: (resolve) => require(['@/views/information'], resolve)
  },
  {
    // 新闻列表夜
    path: '/news',
    name: 'news',
    component: (resolve) => require(['@/views/news'], resolve)
  },
  {
    // 新闻详情页
    path: '/newsDetail',
    name: 'newsDetail',
    component: (resolve) => require(['@/views/newsDetail'], resolve)
  },
  {
    //关于我们
    path: '/aboutus',
    name: 'aboutus',
    component: (resolve) => require(['@/views/aboutus'], resolve)
  },
  {
    //联系我们
    path: '/contact',
    name: 'contact',
    component: (resolve) => require(['@/views/contact'], resolve)
  },
];

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
});

export default router;